package com.qingke.learn.mybatis.util;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class Property {
	
	public static String file = Property.getFileName();
	public static Properties pro = new Properties();
	private static String value = null;
	
	static {
		
	}
	
	
	
	public static String getProperty(String key) {
		try {
			pro.load(new FileInputStream(file));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		value = pro.getProperty(key);
		return value;
	}
	
	private static String getFileName() {
		return "conn.properties";
	}
	
	
}
